import { BaseServer } from "./framework/BaseServer";
import { DebugHost } from "./debughost/DebugHost";

export class ServerMain {

    private _serverList: BaseServer[];

    private _isInited: boolean;

    constructor() {
        this._isInited = false;

        this._serverList = [];
        this._serverList.push(new DebugHost(8787));
    }

    public async Init() {
        for (let server of this._serverList) {
            await server.Init();
        }

        this._isInited = true;
    }

    public LogicUpdate() {
        for (let server of this._serverList) {
            server.LogicUpdate();
        }
    }

}